package com.whately.core.base.controller;

import com.whately.core.base.annotation.IgnoreAccessKey;
import com.whately.core.base.annotation.IgnoreSession;
import com.whately.core.base.model.ApiResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * api 监控读检查
 */
@RestController
@RequestMapping("/api")
@Slf4j
public class WhatelyCheckHealthyController {

    /*
     *   配置信息
     */
    @RequestMapping(params = "method=whately.core.check.ok")
    @IgnoreSession
    @IgnoreAccessKey
    public ApiResponse<String> checkOk() {
        return ApiResponse.<String>builder().data("header check ok !").build();

    }
}
